package com.iwhalecloud.bss.kite.cucc.service.attr.handler;

import com.iwhalecloud.bss.kite.common.constant.KeyConsts;
import com.iwhalecloud.bss.kite.common.util.KiteStringUtils;
import com.iwhalecloud.bss.kite.manager.inst.KiteAttr;
import com.iwhalecloud.bss.kite.manager.inst.KiteInst;
import com.iwhalecloud.bss.kite.service.attr.AttrData;
import com.iwhalecloud.bss.kite.service.attr.handler.AbstractAttrHandler;

/**
 * 地址池类型属性处理器
 */
public class AddressPoolTypeAttrHandler extends AbstractAttrHandler<KiteInst, AttrData> {

    @Override
    public void onShow(KiteAttr attr, KiteInst inst, AttrData data) {
        String operType = inst.getAttrValue("200002753");
        if (KiteStringUtils.equals(operType, "100007392")) {
            attr.setShowType(KeyConsts.PROD_ATTR_SHOW_TYPE_D);
            attr.setIsNull(KeyConsts.IFTRUE_F);
        }else {
            attr.setShowType(KeyConsts.PROD_ATTR_SHOW_TYPE_E);
            attr.setIsNull(KeyConsts.IFTRUE_T);
        }
    }
}
